﻿namespace Core
{
    public abstract class AbstractContext : Entity
    {
        public Binder Bind { get; protected set; }
        public Reflector Reflect { get; protected set; }

        public override T Add<T>()
        {
            var t = base.Add<T>();
            Bind.Bind(t);
            return t;
        }

        public override T Add<T, A>(A a)
        {
            var t = base.Add<T, A>(a);
            Bind.Bind(t);
            return t;
        }

        public override T Add<T, A, B>(A a, B b)
        {
            var t = base.Add<T, A, B>(a, b);
            Bind.Bind(t);
            return t;
        }

        public override T Add<T, A, B, C>(A a, B b, C c)
        {
            var t = base.Add<T, A, B, C>(a, b, c);
            Bind.Bind(t);
            return t;
        }
    }
}
